-- GENERATED SPELL FOR [Cavern Shambler] --


function spell0_12224(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(16790,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12224', 2000, 1)
end

function spell1_12224(pUnit, Event) --@Wild Regeneration,Self--
pUnit:FullCastSpellOnTarget(7948,pUnit)
pUnit:RegisterEvent('Sorts_12224', 23000, 1)
end

function Sorts_12224(pUnit, Event)
local choix_sorts_12224 = math.random(0, 1)
if choix_sorts_12224 == 0 then
pUnit:RegisterEvent('spell0_12224', 1, 1)
end
if choix_sorts_12224 == 1 then
pUnit:RegisterEvent('spell1_12224', 1, 1)
end
end

function mob12224_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12224', math.random(1500, 3000), 1)
end

function mob12224_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12224_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12224_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12224, 1, 'mob12224_Action')
RegisterUnitEvent(12224, 2, 'mob12224_Leave')
RegisterUnitEvent(12224, 3, 'mob12224_Kill')
RegisterUnitEvent(12224, 4, 'mob12224_Die')
